<template>
	<view class="im">
		<!-- 头部导航 -->
		<view class="w-750 w-bj-cont" style="position: fixed; top: 0; left: 0;">
			<view class="h-100 w-row-justify-between-align">
				<view class="wh-80 w-row-center"></view>
				<view class="w-250 h-100 w-row-center w-wz-conts font-36">客服</view>
				<view class="wh-80 w-row-center"></view>
			</view>
		</view>
		<view class="bwh-100"></view>
		<!-- 头部导航结束 -->
		
		<view class="cover-tw index-bg absolute-default fixed">
			
		</view>
		
		<view class="content-box padding-top-xs">
			<view class="padding-sm padding-top-0">
				<view class="bg-white radius-default padding-sm message-card">
					<view class="van-space van-space--horizontal van-space--align-center">
						<view class="van-space-item" style="margin-right: 16rpx;">
							<image src="../../static/index/im-head.png" mode="" class="service-avatar"></image>
						</view>
						
						<view class="van-space-item">
							<view class="">
								<view class="text-bold text-slg">
									欢迎来到客服中心
								</view>
								<view class="text-sm text-color-gray">
									24小时随时为您解答
								</view>
							</view>
						</view>
					</view>
					
					<view class="margin-top-xs">
						联系客服，随时享受一对一在线解答
					</view>
					
					<view class="van-divider van-divider--hairline margin-top-xs margin-bottom-xs">
						
					</view>
					
					<view class="margin-top-xs">
						<button class="van-button van-button--primary van-button--normal van-button--block but2" @click="toIm()">
							<view class="van-button__content">
								<span class="van-button__text">
									在线客服
								</span>
							</view>
						</button>
					</view>
				</view>
			
				<!-- <view class="bg-white radius-default overflow margin-top-xs">
					<view class="padding-sm">
						<view class="dib">
							<image class="icon" src="@/static/tabBar/customer.png" mode="widthFix"></image>
							<span class="custom-title text-sml">系统消息</span>
						</view>
					</view>
				</view>
				
				<view class="padding-sm  w-bj-white">
					<view class="text-sml">
						<view class="van-space van-space--horizontal van-space--align-center">
							<view class="van-space-item">
								<span class="">教程攻略</span>
							</view>
						</view>
					</view>
					
					<view class="van-grid margin-top">
						<view class="van-grid-item" style="flex-basis: 25%;" v-for="(item,index) in infoList" :key="index" @click="selitem()">
							<view class="van-grid-item__content van-grid-item__content--center">
								<view class="disflexCul van-space--horizontal van-space--align-center text-color-grey">
									<view class="van-space-item disflex" style="margin-right: 0.2rem;">
										<image class="info-icon" :src="item.icon"></image>
									</view>
									<view class="van-space-item disflex">
										<span>{{item.title}}</span>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view> -->
			</view>
		</view>
	
	
	</view>
</template>

<script>
	import itemIcon1 from '@/static/index/deposit-icon.png';
	import itemIcon2 from '@/static/index/dispensers-icon.png';
	import itemIcon3 from '@/static/gane/mine-group-icon3.png';
	import itemIcon4 from '@/static/index/qt-icon.png';
	import $H from "@/pages/common/request.js";
	export default {
		data() {
			return {
				infoList: [{
					icon: itemIcon1,
					title: '存款攻略'
				},
				{
					icon: itemIcon2,
					title: '取款攻略'
				},
				{
					icon: itemIcon3,
					title: '玩法攻略'
				},
				{
					icon: itemIcon4,
					title: '其他攻略'
				}],
				appImUrl: ''
				
			}
		},
		onShow(){
			this.getConfig()
		},
		methods: {
			selitem(){
				uni.showToast({
					title: '即将开放',
					icon: 'none'
				});
			},
			toIm(){
				// console.log(this.appImUrl,'this.appImUrl')
				window.open(this.appImUrl)
				// console.log(window.location.origin,'window.location.origin')
			},
			getConfig() {
				$H.post('/app_user_get_config').then((res) => {
					// console.log(res)
					if (res.code == 200) {
						this.appImUrl = res.data.app_imurl
			
					} else {
						return uni.showToast({
							title: res.msg,
							duration: 1000,
							icon: 'none'
						});
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
body {
		background-color: #f0f3ff !important;
		color: #535d76;
		line-height: 1.6;
		    font-size: 3.46667vw;
	}

	uni-page-body {
		background-color: transparent;
	}

	.w-bj-cont {
		background-color: transparent;
	}

	.w-row-center {
		color: #333 !important;
	}
	
	.index-bg{
		background-image: url('@/static/index/tg1.png');
		transform: translateY(-70rpx);
		z-index: -1;
	}
	
	.van-space--align-center {
	    align-items: center;
		.van-space-item {
		    display: flex;
		    align-items: center;
			.service-avatar {
			    width: 16vw;
			    height: 16vw;
			}
		}
	}
	.van-space {
	    display: inline-flex
	;
	}
	
	.dib {
	    display: flex;
		align-items: center;
		.icon{
			width: 32rpx;
		}
		
		.custom-title{
			margin-left: 10rpx;
		}
	}
	
	.van-grid-item{
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	
	.info-icon{
		width: 64rpx;
		height: 64rpx;
		margin-bottom: 10rpx;
	}
</style>